import Vue from 'vue'
import VueRouter from 'vue-router'
import login from "../views/login.vue"

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Login',
	component:()=>import("../views/login.vue")
	
  },
  {
    path: '/home',
    name: 'home',
  	component:()=>import("../views/home.vue"),
	children:[
		
		{
			path:'/article',
			name:'article',
			component:()=>import("../views/article.vue")
		},
		{
			path:'/articleType',
			name:'articleType',
			component:()=>import("../views/articleType.vue")
		},
		{
			path:'/users',
			name:'users',
			component:()=>import("../views/users.vue")
		},
	]
  },
  
  
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
